home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / AppleShare.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-08-01  |  5.5 KB  |  214 lines  |  [TEXT/MPS ]

  1. /********************************************
  2. ; File: AppleShare.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9. #ifndef __TYPES__
  10. #include <TYPES.h>
  11. #endif
  12.  
  13. #ifndef __GSOS__
  14. #include <GSOS.h>
  15. #endif
  16.  
  17. #ifndef __APPLESHARE__
  18. #define __APPLESHARE__
  19.  
  20.  
  21. /* Command Numbers */
  22. #define ASBufferControl 0x0001
  23. #define ASByteRangeLock 0x0002
  24. #define ASSpecialOpenFork 0x0003
  25. #define ASGetPrivileges 0x0004
  26. #define ASSetPrivileges 0x0005
  27. #define ASUserInfo 0x0006
  28. #define ASCopyFile 0x0007
  29. #define ASGetUserPath 0x0008
  30. #define ASOpenDesktop 0x0009
  31. #define ASCloseDesktop 0x000A
  32. #define ASGetComment 0x000B
  33. #define ASSetComment 0x000C
  34. #define ASGetSrvrName 0x000D
  35.  
  36. /* Error Codes */
  37. #define appleShareNetError 0x8888  /* AppleShare Network Error */
  38. #define unknownUser 0x007E  /* specified user name not registered */
  39. #define unknownGroup 0x007F  /* specified group name not the name of a group */
  40.  
  41. /* Masks */
  42. #define lockRange 0x8000
  43. #define relativeToEOF 0x4000
  44. #define seeFolders 0x01
  45. #define seeFiles 0x02
  46. #define makeChanges 0x0004
  47. #define folderOwner 0x80
  48.  
  49. /* File Info Masks */
  50. #define onDesktop 0x0001
  51. #define bFOwnAppl 0x0002  /* used internally */
  52. #define bFNever 0x0010  /* never SwitchLaunch */
  53. #define bFAlways 0x0020  /* always SwitchLaunch */
  54. #define shareApplication 0x0040  /* set if file is a shareable application */
  55. #define fileIsInited 0x0100  /* seen by Finder */
  56. #define fileHasChanged 0x0200  /* used internally by Finder */
  57. #define fileIsBusy 0x0400  /* copied from File System busy bit */
  58. #define fileNoCopy 0x0800  /* not used in 5.0 and later, formally BOZO */
  59. #define fileIsSystem 0x1000  /* set if file is a system file */
  60. #define fileHasBundle 0x2000
  61. #define fileIsInvisible 0x4000
  62. #define fileIsLocked 0x8000
  63.  
  64. /* Window Info Masks */
  65. #define inTrashWindow 0xFFFD
  66. #define inDesktopWindow 0xFFFE
  67. #define inDiskWindow 0x0000
  68.  
  69. /* accessWord Masks */
  70. #define requestReadAccess 0x0001
  71. #define requestWriteAccess 0x0002
  72. #define denyReadAccess 0x0010
  73. #define denyWriteAccess 0x0020
  74.  
  75. /* forkNum Masks */
  76. #define dataForkNum 0x0000
  77. #define resourceForkNum 0x0001
  78.  
  79. /* Other Constants */
  80. #define disableBuffering 0x8000
  81. #define enableBuffering 0x0000
  82. struct BufferControlRec {
  83.    Word pCount;
  84.    Word fstNum;
  85.    Word commandNum;
  86.    Word refNum; /*   */
  87.    Word flags; /*   */
  88. } ;
  89. typedef struct BufferControlRec BufferControlRec, *BufferControlRecPtr;
  90. struct SpecialOpenForkRec {
  91.    Word pCount;
  92.    Word fstNum;
  93.    Word commandNum;
  94.    Word refNum;
  95.    GSString255Ptr pathname;
  96.    Word accessMode;
  97.    Word forkNum;
  98. } ;
  99. typedef struct SpecialOpenForkRec SpecialOpenForkRec, *SpecialOpenForkRecPtr;
  100. struct ByteRangeLockRec {
  101.    Word pCount;
  102.    Word fstNum;
  103.    Word commandNum;
  104.    Word refNum;
  105.    Word lockFlag;
  106.    LongWord fileOffset;
  107.    LongWord rangeLength; /*   */
  108.    LongWord rangeStart; /*   */
  109. } ;
  110. typedef struct ByteRangeLockRec ByteRangeLockRec, *ByteRangeLockRecPtr;
  111. struct GetAccessRightsRec {
  112.    Byte userSummary;
  113.    Byte world;
  114.    Byte group;
  115.    Byte owner;
  116. } ;
  117. typedef struct GetAccessRightsRec GetAccessRightsRec, *GetAccessRightsRecPtr;
  118. struct GetPrivilegesRec {
  119.    Word pCount;
  120.    Word fstNum;
  121.    Word commandNum;
  122.    GSString255Ptr pathname;
  123.    GetAccessRightsRec accessRights;
  124.    ResultBuf255Ptr ownerName;
  125.    ResultBuf255Ptr groupName;
  126. } ;
  127. typedef struct GetPrivilegesRec GetPrivilegesRec, *GetPrivilegesRecPtr;
  128. struct SetAccessRightsRec {
  129.    Byte reserved;
  130.    Byte world;
  131.    Byte group;
  132.    Byte owner;
  133. } ;
  134. typedef struct SetAccessRightsRec SetAccessRightsRec, *SetAccessRightsRecPtr;
  135. struct SetPrivilegesRec {
  136.    Word pCount;
  137.    Word fstNum;
  138.    Word commandNum;
  139.    GSString255Ptr pathname;
  140.    SetAccessRightsRec accessRights;
  141.    ResultBuf255Ptr ownerName;
  142.    ResultBuf255Ptr groupName;
  143. } ;
  144. typedef struct SetPrivilegesRec SetPrivilegesRec, *SetPrivilegesRecPtr;
  145. struct UserInfoRec {
  146.    Word pCount;
  147.    Word fstNum;
  148.    Word commandNum;
  149.    Word deviceNum;
  150.    ResultBuf255Ptr userName;
  151.    ResultBuf255Ptr primaryGroupName;
  152. } ;
  153. typedef struct UserInfoRec UserInfoRec, *UserInfoRecPtr;
  154. struct CopyFileRec {
  155.    Word pCount;
  156.    Word fstNum;
  157.    Word commandNum;
  158.    GSString255Ptr sourcePathname;
  159.    GSString255Ptr destPathname;
  160. } ;
  161. typedef struct CopyFileRec CopyFileRec, *CopyFileRecPtr;
  162. struct GetUserPathRec {
  163.    Word pCount;
  164.    Word fstNum;
  165.    Word commandNum;
  166.    GSString255Ptr prefix;
  167. } ;
  168. typedef struct GetUserPathRec GetUserPathRec, *GetUserPathRecPtr;
  169. struct DesktopRec {
  170.    Word pCount;
  171.    Word fstNum;
  172.    Word commandNum;
  173.    Word desktopRefNum;
  174.    GSString255Ptr pathname;
  175. } ;
  176. typedef struct DesktopRec DesktopRec, *DesktopRecPtr;
  177. struct GetCommentRec {
  178.    Word pCount;
  179.    Word fstNum;
  180.    Word commandNum;
  181.    Word desktopRefNum;
  182.    GSString255Ptr pathname;
  183.    ResultBuf255Ptr comment;
  184. } ;
  185. typedef struct GetCommentRec GetCommentRec, *GetCommentRecPtr;
  186. struct SetCommentRec {
  187.    Word pCount;
  188.    Word fstNum;
  189.    Word commandNum;
  190.    Word desktopRefNum;
  191.    GSString255Ptr pathname;
  192.    GSString255Ptr comment;
  193. } ;
  194. typedef struct SetCommentRec SetCommentRec, *SetCommentRecPtr;
  195. struct GetServerNameRec {
  196.    Word pCount;
  197.    Word fstNum;
  198.    Word commandNum;
  199.    GSString255Ptr pathname;
  200.    ResultBuf255Ptr serverName;
  201.    ResultBuf255Ptr zoneName;
  202. } ;
  203. typedef struct GetServerNameRec GetServerNameRec, *GetServerNameRecPtr;
  204. struct ASOptionListRec {
  205.    Word bufferSize; /*   */
  206.    Word dataSize; /*   */
  207.    Word theFileSysID; /*   */
  208.    Byte finderInfo[32]; /*   */
  209.    LongWord parentDirID; /*   */
  210.    LongWord accessRights; /*   */
  211. } ;
  212. typedef struct ASOptionListRec ASOptionListRec, *ASOptionListRecPtr;
  213. #endif
  214.